<template>
  <ul>
    <li><div class="menu-item" @mousedown.stop="handleClickGetter">Getter</div></li>
    <li><div class="menu-item" @mousedown.stop="handleClickSetter">Setter</div></li>
  </ul>
</template>

<script>
import { mapMutations } from 'vuex';

export default {
  methods: {
    ...mapMutations(['addVariableNode']),

    handleClickGetter(ev) {
      this.addVariableNode('Getter');
    },

    handleClickSetter(ev) {
      this.addVariableNode('Setter');
    },
  },
};
</script>
